program GenChecklist;

{$APPTYPE CONSOLE}

uses
  GenAutomataTools,Math;

Const wNum=10;
      rNum=10;
      maxStLen=10;

var f:TextFile;
    ex:BAut;
    i,j:integer;
    ch:char;
    s:string;

begin
  AssignFile(f,'automata_checklistcreator.txt');
  Reset(f);
  for i:=1 to StNum do begin
    read(f,ch);
    if ch='t' then ex[i].tm:=true else ex[i].tm:=false;
    readln(f,ex[i].j0,ex[i].j1);
  end;
  CloseFile(f);
  AssignFile(f,checklist);
  Rewrite(f);
  randomize;
  writeln(f,rNum,' ',wNum);
  i:=0;
  repeat
    s:='';
    for j:=1 to RandomRange(1,maxStLen+1) do begin;
      if RandomRange(0,2)=0 then s:=s+'0' else s:=s+'1';
    end;
    if TestBAut(ex,s) then begin
      i:=i+1;
      writeln(f,s);
    end;
  until i=rNum;
  i:=0;
  while i<>wNum do begin
    s:='';
    for j:=1 to RandomRange(1,maxStLen+1) do begin;
      if RandomRange(0,2)=0 then s:=s+'0' else s:=s+'1';
    end;
    if not(TestBAut(ex,s)) then begin
      i:=i+1;
      writeln(f,s);
    end;
  end;
  CloseFile(f);
end.
